<?php

/**
 * Created by PhpStorm.
 * User: luzhaoyang
 * Date: 2017/7/19
 * Time: 14:00
 * 海报后台处理控制器
 */
class Postimage extends Base_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model('image_model');
    }

    public function text()
    {
        if (!is_cli()) die('request forbidden');
        set_time_limit(0);
        $this->image_model->fmdkpost();

    }

    public function resize()
    {
        if (!is_cli()) die('request forbidden');
        $config=array();
        $config['source_image']='/home/nldou/webroot/web/fmdk-career-4.jpg';
        $config['height']=1280;
        $config['width']=720;
        $this->image_model->resize($config);
        echo 'fmdk-career-4.jpg ok'.PHP_EOL;
    }

    public function downloadwximg()
    {
        if (!is_cli()) die('request forbidden');
        $this->image_model->downloadwxusericon();
    }
}